namespace com.ytocargo.EntityFramework.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class flight4monitor : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "YGFOC.FlightInfo4Monitor",
                c => new
                    {
                        ID = c.Decimal(nullable: false, precision: 10, scale: 0, identity: true),
                        CompanyCode2 = c.String(nullable: false, maxLength: 2),
                        CompanyCode3 = c.String(nullable: false, maxLength: 3),
                        FltId = c.String(nullable: false, maxLength: 10),
                        FltIdFix = c.String(maxLength: 2),
                        FltSeq = c.Decimal(nullable: false, precision: 18, scale: 2),
                        FltDate = c.DateTime(nullable: false),
                        CoSeq = c.String(nullable: false, maxLength: 2),
                        FltTask = c.String(maxLength: 3),
                        ServiceType = c.String(maxLength: 1),
                        FltType = c.String(nullable: false, maxLength: 1),
                        FltOpType = c.String(nullable: false, maxLength: 1),
                        FltStatus = c.String(nullable: false, maxLength: 3),
                        ConFltId = c.String(maxLength: 5),
                        ConFltIdFix = c.String(maxLength: 2),
                        ConCompanyCode2 = c.String(maxLength: 2),
                        ConFltDate = c.DateTime(),
                        FltLoopId = c.String(maxLength: 7),
                        Std = c.DateTime(nullable: false),
                        Sta = c.DateTime(nullable: false),
                        SchDepApt = c.String(nullable: false, maxLength: 3),
                        SchArrApt = c.String(nullable: false, maxLength: 3),
                        Etd = c.DateTime(),
                        Eta = c.DateTime(),
                        DepApt = c.String(nullable: false, maxLength: 3),
                        ArrApt = c.String(nullable: false, maxLength: 3),
                        LatestOffTime = c.DateTime(),
                        LatestOnTime = c.DateTime(),
                        LatestOffStatus = c.String(nullable: false, maxLength: 3),
                        LatestOnStatus = c.String(nullable: false, maxLength: 3),
                        DoorCloseTime = c.DateTime(),
                        OffBlockTime = c.DateTime(),
                        OutTime = c.DateTime(),
                        TaxioutTime = c.DateTime(),
                        OffTime = c.DateTime(),
                        OnTime = c.DateTime(),
                        TaxiinTime = c.DateTime(),
                        InTime = c.DateTime(),
                        OnBlockTime = c.DateTime(),
                        DoorsOpnTime = c.DateTime(),
                        StdSrc = c.String(maxLength: 15),
                        StaSrc = c.String(maxLength: 15),
                        EtdSrc = c.String(maxLength: 15),
                        EtaSrc = c.String(maxLength: 15),
                        LatestOffTimeSrc = c.String(maxLength: 15),
                        LatestOnTimeSrc = c.String(maxLength: 15),
                        LatestOffStatusSrc = c.String(maxLength: 15),
                        LatestOnStatusSrc = c.String(maxLength: 15),
                        DoorCloseTimeSrc = c.String(maxLength: 15),
                        OffBlockTimeSrc = c.String(maxLength: 15),
                        OutTimeSrc = c.String(maxLength: 15),
                        TaxioutTimeSrc = c.String(maxLength: 15),
                        OffTimeSrc = c.String(maxLength: 15),
                        OnTimeSrc = c.String(maxLength: 15),
                        TaxiinTimeSrc = c.String(maxLength: 15),
                        InTimeSrc = c.String(maxLength: 15),
                        OnBlockTimeSrc = c.String(maxLength: 15),
                        DoorsOpnTimeSrc = c.String(maxLength: 15),
                        LatestUpdateSrc = c.String(nullable: false, maxLength: 15),
                        DealTime = c.DateTime(nullable: false),
                        FltIdAltn = c.String(nullable: false, maxLength: 40),
                        FltSeqReal = c.Decimal(nullable: false, precision: 10, scale: 0),
                        FltIdPk = c.String(nullable: false, maxLength: 40),
                        StartCheckTime = c.DateTime(),
                        StdLocal = c.DateTime(nullable: false),
                        StaLocal = c.DateTime(nullable: false),
                        EtdLocal = c.DateTime(),
                        EtaLocal = c.DateTime(),
                        DoorCloseTimeLocal = c.DateTime(),
                        OffBlockTimeLocal = c.DateTime(),
                        OutTimeLocal = c.DateTime(),
                        TaxioutTimeLocal = c.DateTime(),
                        OffTimeLocal = c.DateTime(),
                        OnTimeLocal = c.DateTime(),
                        TaxiinTimeLocal = c.DateTime(),
                        InTimeLocal = c.DateTime(),
                        OnBlockTimeLocal = c.DateTime(),
                        DoorsOpnTimeLocal = c.DateTime(),
                        SoflSeqNr = c.Decimal(nullable: false, precision: 10, scale: 0),
                        FltDatePek = c.DateTime(nullable: false),
                        ChangeTime = c.DateTime(nullable: false),
                        CargoDoorCloseTime = c.DateTime(nullable: false),
                        CargoDoorCloseTimeLocal = c.DateTime(nullable: false),
                        CabinDoorCloseTime = c.DateTime(nullable: false),
                        CabinDoorCloseTimeLocal = c.DateTime(nullable: false),
                        GlobalPk = c.String(maxLength: 11),
                    })
                .PrimaryKey(t => t.ID);
            
        }
        
        public override void Down()
        {
            DropTable("YGFOC.FlightInfo4Monitor");
        }
    }
}
